<?php

namespace ticky\view;

use ticky\app;

abstract class contract {

    abstract public function exists($viewFile);

    abstract public function assign($name, $value);

    abstract public function display($viewName, $module = null);

    public function getViewFile($viewName = null, $module = null) {
        $viewfile = template($viewName, $module);
        if (!is_file($viewfile)) {
            app::fatalerror('view file does not exist : ' . $viewfile . '<br/><br/>', 1);
        }
        return $viewfile;
    }

}
